import request from '@/utils/request'

// 登录api请求
export const loginApi = (data) => request.post('/sys/login', data)
// 获取用户信息
export const getUserInfoApi = () => request.get('/sys/profile')
//
export const updatePasswordApi = (data) => request({
  url: '/sys/user/updatePess',
  data
})
export const getUserDetailById = (id) => request.get(`/sys/user/${id}`)

// 获取加密串-用来生成二维码
export const getQrcodeKeyApi = () => request.get('/sys/qrcodeKey')
// 获取扫码多种状态 1 未扫码 但是加密串未超时 2 已扫码但是未登录 3 已扫码并点登录 4 加密串失效或不存在 5 扫码后用户取消登录
export const getQrCodeStateApi = params => request.get('/sys/qrcodeState', { params })
